package com.onlinevideo.service.impl;

import com.onlinevideo.dao.AuthorityDao;
import com.onlinevideo.dao.AuthorityDao;
import com.onlinevideo.dao.UserDao;
import com.onlinevideo.dao.impl.AuthorityDaoImpl;
import com.onlinevideo.dao.impl.AuthorityDaoImpl;
import com.onlinevideo.entity.Authority;
import com.onlinevideo.entity.Authority;
import com.onlinevideo.service.AuthorityService;

import java.util.List;

public class AuthorityServiceImpl  implements AuthorityService {

    private AuthorityDao authorityDao = new AuthorityDaoImpl();

    @Override
    public int insert(Authority authority) {
        return authorityDao.insert(authority);
    }

    @Override
    public int delete(Long id) {
        return authorityDao.delete(id);
    }

    @Override
    public int update(Authority authority) {
        return authorityDao.update(authority);
    }

    @Override
    public Authority queryById(Long id) {
        return authorityDao.queryById(id);
    }

    @Override
    public List<Authority> queryAll() {
        return authorityDao.queryAll();
    }

    @Override
    public List<Authority> queryByRoleId(Long roleId) {
        return authorityDao.queryByRoleId(roleId);
    }
}
